package leetcode_2501_2600;

public class LeeCode_2536 {
    public static void main(String[] args) {

    }
    private static int[][] rangeAddQueries(int n, int[][] queries) {
        int[][] ans = new int[n][n];
        for (int[] query : queries) {
            int min_x = Math.min(query[0], query[2]);
            int max_x = Math.max(query[0], query[2]);
            int min_y = Math.min(query[1], query[3]);
            int max_y = Math.max(query[1], query[3]);
            for (int i = min_x; i <= max_x; i++) {
                for (int j = min_y; j <= max_y; j++) {
                    ans[i][j]++;
                }
            }
        }
        return ans;
    }
}
